html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.show {
    visibility: visible;
}

.hidden {
    visibility: hidden;
}

button {
    user-select: none;
}

label, span, p{
    cursor: pointer;
    user-select: auto;
}

.center-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    margin: auto;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
}

.bank-container {
    width: 1140px;
    height: 800px;
    border: 1px solid lightgrey;
    border-radius: 5px;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    margin: auto;
}

.im-container {
    width: 1140px;
    height: 800px;
    border: 1px solid lightgrey;
    border-radius: 5px;
    display: grid;
    grid-template-columns: minmax(70px, 1fr) 13fr;
    grid-template-rows: 1fr;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    margin: auto;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
}

.im-container .im-nav-slider {
    background-color: #171717;
    height: 100%;
}

.im-container .im-nav-slider .nav {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.im-container .im-nav-slider .nav .nav-item {
    display: block;
    margin: 10px 0 10px 20px;
}

.grow {
    flex-grow: 1;
}

.im-container .im-nav-slider .nav .nav-item a {
    color: white;
    text-decoration: none;
}

.im-container .im-nav-slider .nav .nav-item .icon {
    fill: grey;
    color: grey;
    stroke: grey;
}

.im-container .im-main {
    background-color: #faf8f3;
    border-radius: 5px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.nav-user-icon {
    width: 30px;
    height: 30px;
    user-select: none;
}


/* 蒙板样式 */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* 半透明白色背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* 确保在最上层 */
}

/* 加载器样式 */
.loader {
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/******************************导航栏 start*************************************/

/* 导航栏样式 */
nav {
    background-color: #333; /* 背景颜色 */
    overflow: hidden; /* 清除浮动 */
}

/* 列表样式 */
nav ul {
    list-style-type: none; /* 移除列表前的标记 */
    margin: 0;
    padding: 0;
}

/* 列表项样式 */
nav ul li {
    float: left; /* 使列表项水平排列 */
}

/* 链接样式 */
nav ul li a {
    display: block; /* 使链接块级显示 */
    color: white; /* 文字颜色 */
    text-align: center; /* 文字居中 */
    padding: 14px 16px; /* 内边距 */
    text-decoration: none; /* 移除下划线 */
}

/* 链接 - 鼠标悬停 */
nav ul li a:hover {
    background-color: #ddd; /* 鼠标悬停时的背景颜色 */
    color: black; /* 鼠标悬停时的文字颜色 */
}

.hot-message-total {
    position: relative;
    display: inline-block;
    margin: 15px 0;
}

.session-message {
    position: absolute;
}

.badge {
    display: inline-block;
    min-width: 24px;
    padding: 4px 8px;
    border-radius: 12px;
    background-color: #ff4757;
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    line-height: 1.3;
    vertical-align: middle;
}

.circle-badge {
    position: absolute;
    top: 1px;
    /*right: -45px;*/
    left: 25px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/******************************导航栏 end*************************************/

/***************************** Modal start*********************************************/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-overlay .modal {
    background-color: white;
    border-radius: 8px;
    margin-left: 20px;
    margin-right: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-overlay .modal .modal-header {
    display: grid;
    grid-template-columns: 3fr minmax(100px, 1fr);
    padding: 10px;
    background-color: #595656;
    border-radius: 8px 8px 0 0;
    color: white;
}

.modal-overlay .modal .modal-header .title {
    font-size: 15px;
}

.modal-overlay .modal .modal-header .control {
    text-align: right;
}
/***************************** Modal end*********************************************/
.session-message-page {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 5fr;
    height: 100%;
}

.session-message-page .im-session-container {
    /*background-color: #f3f3f3;*/
    background-image: linear-gradient(to right, #f3f3f3 95%, #e8e4e4 98%, #f3f3f3 100%);
    border-left-width: 1px; /* 只设置左边的宽度 */
    border-left-style: solid; /* 只设置左边的样式 */
    border-left-color: #201f1f;
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100%;
}

.session-message-page .im-session-container .im-session-list {
    list-style-type: none;
    margin: 0;
    padding: 10px 0 0 0;
    overflow-y: scroll;
    max-height: 730px;
}

.session-message-page .im-session-container li {
    margin: 0;
    padding: 0;
}

.session-message-page .im-session-container .im-session-item {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 50px 1fr;
    grid-template-areas:
        "icon name close"
        "icon message time";
    align-items: center; /* 垂直居中 */
    padding: 5px 0 0 10px;
}

.session-message-page .im-session-container .active {
    background-color: #aea6a6;
}

.session-message-page .im-session-container .im-session-item:hover {
    background-color: #d1c9c9;
}

icon {
    grid-area: icon;
    position: relative;
    display: inline-block;
}

name {
    grid-area: name;
    font-weight: bold;
    font-size: 13px;
    max-width: 100px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
}

close {
    grid-area: close;
    font-size: 10px;
    margin-right: 10px;
}

message {
    grid-area: message;
    font-size: 9px;
    margin-right: 10px;
    width: 90px;
    white-space: nowrap; /* 文本不换行 */
    overflow: hidden; /* 隐藏溢出的内容 */
    text-overflow: ellipsis;
}

time {
    grid-area: time;
    font-size: 10px;
}


.im-session-icon {
    width: 40px;
    height: 40px;
}

.im-session-search-view {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-column-gap: 10px;
    margin: 10px;
    align-items: center;
    width: 180px;
}

.im-session-search-view input[type="text"] {
    padding: 3px;     /* 内边距 */
    border: 2px solid #ccc; /* 边框宽度、样式和颜色 */
    border-radius: 5px; /* 边框圆角 */
    font-size: 16px;   /* 字体大小 */
    color: #333;       /* 字体颜色 */
    background-color: #f9f9f9; /* 背景颜色 */
    outline: none;    /* 去除点击时的轮廓线 */
    transition: border-color 0.3s ease; /* 边框颜色变化过渡效果 */
}

.im-session-search-view input[type="text"]:focus {
    border-color: #595656; /* 聚焦时边框颜色 */
}

.message-container {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    padding: 0 0 0 10px;
}

.message-container .message-header {
    display: flex;
    flex-direction: row;
    padding: 10px;
    border-bottom-width: 1px; /* 只设置左边的宽度 */
    border-bottom-style: solid; /* 只设置左边的样式 */
    border-bottom-color: #efebeb;
}

.message-container .message-toolbar {
    display: flex;
    flex-direction: row;
    padding: 10px;
    border-top-width: 1px; /* 只设置左边的宽度 */
    border-top-style: solid; /* 只设置左边的样式 */
    border-top-color: #efebeb;
}

.message-container .message-toolbar img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.message-container .message-editor {
    display: flex;
    flex-direction: column;
    padding: 2px;
    position: relative;
}

.message-container .message-editor .text-area {
    margin: 0 0 10px 0;
}

.message-container .message-editor .send-button-pane {
    display: grid;
    justify-items: end;
}

.message-container .message-editor .send-btn {
    margin-top: 5px;
    padding: 3px 10px 3px 10px;
    background-color: #4ef14e;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

.message-container .message-editor .send-btn-disabled {
    margin-top: 5px;
    padding: 3px 10px 3px 10px;
    background-color: #8b8c8b;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 5px;
    cursor: none;
}

.message-container .message_editor {
    height: 80px; /* 设置高度 */
    padding: 10px; /* 设置内边距 */
    border: 2px solid #4CAF50; /* 设置边框 */
    border-radius: 8px; /* 设置圆角 */
    font-family: Arial, sans-serif; /* 设置字体 */
    font-size: 18px; /* 设置字体大小 */
    /*line-height: 1.6; !* 设置行高 *!*/
    background-color: #f9f9f9; /* 设置背景颜色 */
    color: #333; /* 设置文本颜色 */
    resize: vertical; /* 允许用户垂直调整大小 */
    overflow-y: auto; /* 当内容超出时显示滚动条 */
}



.list-view {
    position: absolute;
    width: 100%;
}

.message-container .message-list-view {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 10;
}

.message-container .message-list-view .message-item-left {
    display: grid;
    grid-template-columns: 40px 50px auto 40px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "micon mname mtime mtime mblank"
                        "micon mcontent mcontent mstatus mblank";
    justify-content: left;
    padding: 10px;
}
micon {
    grid-area: micon;
}
mname {
    grid-area: mname;
    font-size: 10px;
    justify-self: start;
    align-self: center;
    padding-right: 10px;
}
mcontent {
    grid-area: mcontent;
    background-color: white;
    padding: 5px;
    border-radius: 5px;
    max-width: 200px;
    text-align: start;
}
mtime {
    grid-area: mtime;
    font-size: 7px;
    justify-self: start;
    align-self: center;
}
mblank {
    grid-area: mblank;
}
mstatus {
    grid-area: mstatus;
    align-self: end;
    justify-self: center;
}

.message-container .message-list-view .message-item-right {
    display: grid;
    grid-template-columns: 1fr 60px auto 50px 40px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "rblank rtime rtime rname ricon"
        "rblank rstatus rcontent rcontent ricon";
    justify-content: end;
    padding: 10px;
    margin-right: 15px;
}

ricon {
    grid-area: ricon;
    margin-left: 10px;
}
rname {
    grid-area: rname;
    font-size: 10px;
    justify-self: end;
    align-self: center;
    padding-left: 10px;
}
rcontent {
    grid-area: rcontent;
    align-self: end;
    background-color: #97ef58;
    padding: 5px;
    max-width: 200px;
    border-radius: 5px;
    text-align: end;
}
rtime {
    grid-area: rtime;
    font-size: 7px;
    align-self: center;
    justify-self: end;
}
rblank {
    grid-area: rblank;
}
rstatus {
    grid-area: rstatus;
    align-self: end;
    justify-self: end;
    margin-right: 10px;
}

.row-expanded {
    flex-grow: 10;
}

/******************************************************************************************/
/* 风格1：简约风格 */
.minimal::-webkit-scrollbar {
    width: 8px;
}

.minimal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.minimal::-webkit-scrollbar-thumb {
    background: rgb(220, 216, 216);
    border-radius: 4px;
}

.minimal::-webkit-scrollbar-thumb:hover {
    background: rgb(251, 242, 242);
}

/* 风格2：霓虹风格 */
.neon .scroll-box::-webkit-scrollbar {
    width: 12px;
}

.neon .scroll-box::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.neon .scroll-box::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
}

/* 风格3：材质设计 */
.material .scroll-box::-webkit-scrollbar {
    width: 10px;
}

.material .scroll-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.material .scroll-box::-webkit-scrollbar-thumb {
    background: #4db6ac;
    border-radius: 5px;
}

.material .scroll-box::-webkit-scrollbar-thumb:hover {
    background: #26a69a;
}

/* 风格4：深色渐变 */
.gradient .scroll-box::-webkit-scrollbar {
    width: 14px;
}

.gradient .scroll-box::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #2c3e50, #1a1a2e);
    border-radius: 7px;
}

.gradient .scroll-box::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #3498db, #1abc9c);
    border-radius: 7px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Firefox 滚动条样式 */
.minimal .scroll-box {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.neon .scroll-box {
    scrollbar-width: thin;
    scrollbar-color: #ff00ff #000;
}

.material .scroll-box {
    scrollbar-width: thin;
    scrollbar-color: #4db6ac rgba(255, 255, 255, 0.1);
}

.gradient .scroll-box {
    scrollbar-width: thin;
    scrollbar-color: #3498db #2c3e50;
}
/*************************************************************************************/

.user-group-page {
    padding: 10px 0 0 0;
    background-image: linear-gradient(to right, #f3f3f3 95%, #e8e4e4 98%, #f3f3f3 100%);
    border-left-width: 1px; /* 只设置左边的宽度 */
    border-left-style: solid; /* 只设置左边的样式 */
    border-left-color: #201f1f;
    width: 190px;
    flex-grow: 1;
}

.user-group-page .user-btn {
    margin-left: 10px;
    padding: 5px 25px 5px 25px;
    background: linear-gradient(135deg, #888788 0%, #e6e7e8 100%);
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
}

.user-group-page .user-btn:hover {
    box-shadow:
            0 0 15px rgba(216, 202, 232, 0.8),
            0 6px 25px rgba(173, 173, 174, 0.5);
    background: linear-gradient(135deg, #e3daef 0%, #acadae 100%);
}

.user-group-page .user-search-view {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-column-gap: 5px;
    margin: 10px;
    align-items: center;
    user-select: none;
}

.user-group-page .user-search-view input[type="text"] {
    padding: 3px;     /* 内边距 */
    border: 2px solid #ccc; /* 边框宽度、样式和颜色 */
    border-radius: 5px; /* 边框圆角 */
    font-size: 16px;   /* 字体大小 */
    color: #333;       /* 字体颜色 */
    background-color: #f9f9f9; /* 背景颜色 */
    outline: none;    /* 去除点击时的轮廓线 */
    transition: border-color 0.3s ease; /* 边框颜色变化过渡效果 */
}

.user-group-page .user-search-view input[type="text"]:focus {
    border-color: #595656; /* 聚焦时边框颜色 */
}


.user-group-page .group-btn {
    padding: 5px 25px 5px 25px;
    background: linear-gradient(135deg, #888788 0%, #e6e7e8 100%);
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.user-group-page .group-btn:hover {
    box-shadow:
            0 0 15px rgba(216, 202, 232, 0.8),
            0 6px 25px rgba(173, 173, 174, 0.5);
    background: linear-gradient(135deg, #e3daef 0%, #acadae 100%);
}

.im-user-search-view {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-column-gap: 10px;
    margin: 10px;
    align-items: center;
}

.im-user-search-view input[type="text"] {
    padding: 3px;     /* 内边距 */
    border: 2px solid #ccc; /* 边框宽度、样式和颜色 */
    border-radius: 5px; /* 边框圆角 */
    font-size: 16px;   /* 字体大小 */
    color: #333;       /* 字体颜色 */
    background-color: #f9f9f9; /* 背景颜色 */
    outline: none;    /* 去除点击时的轮廓线 */
    transition: border-color 0.3s ease; /* 边框颜色变化过渡效果 */
}

.im-user-search-view input[type="text"]:focus {
    border-color: #595656; /* 聚焦时边框颜色 */
}

/*************************************************************************************************************************/

.tree ul { padding-left: 20px; list-style: none; }
.node-label { cursor: pointer; user-select: none; }
.node-label:hover { background-color: #f0f0f0; }


/*************************************************************************************************************************/
.popover-container {
    position: relative;
    display: inline-block;
}

.popover-container:focus-within .popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.popover {
    --popover-bg: #ffffff;
    --popover-color: #2c3e50;
    --popover-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --popover-arrow-size: 10px;

    position: absolute;
    background: var(--popover-bg);
    color: var(--popover-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--popover-shadow);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.popover::before {
    content: '';
    position: absolute;
    width: var(--popover-arrow-size);
    height: var(--popover-arrow-size);
    background: var(--popover-bg);
    transform: rotate(45deg);
    z-index: -1;
}

/* 定位样式 */
.top .popover {
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
}

.top .popover::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.bottom .popover {
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
}

.bottom .popover::before {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(50%) rotate(45deg);
    box-shadow: -1px -1px 3px rgba(0, 0, 0, 0.1);
}

.left .popover {
    top: 50%;
    right: calc(100% + 10px);
    transform: translateY(-50%) translateX(10px);
}

.left .popover::before {
    top: 50%;
    right: 0;
    transform: translateX(50%) translateY(-50%) rotate(45deg);
    box-shadow: 2px -2px 3px rgba(0, 0, 0, 0.1);
}

.right .popover {
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%) translateX(-10px);
}

.right .popover::before {
    top: 50%;
    left: 0;
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
    box-shadow: -2px 2px 3px rgba(0, 0, 0, 0.1);
}

